#ifndef COMM_SHM_H_
#define COMM_SHM_H_

typedef struct shmCDT * shmADT;

/* Funciones */

/* Inicia Sesion */
shmADT open_conn_shm (int id, int flag);

/* Envia Informacion */
void send_data_shm (shmADT conn, char * s_msg, int size);

/* Recibe Informacion */
void rcv_data_shm (shmADT conn, char * r_msg);

/* Cerrar Conexion */
int close_conn_shm (shmADT conn);

void putZeros (char * arr, int len);

char * getShm(shmADT s);

int getShmKey(shmADT s);

int send_file_shm (shmADT snd, shmADT rcv, char *fname, int isdir, int who);

int walkDirSM(char *path, char *relPath, shmADT snd, shmADT rcv);

int getNum_shm (char * msg, int * ret);

int msgForServer (shmADT s);

int msgForClient (shmADT s);


#endif
